import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/home'
  },
  {
    path: '/home',
    component: () => import('../views/home/Home.vue'),
    children:[
      {
        path:'/home',
        redirect:'/home/homes'
      },
      {
        path:'/home/homes',
        component:() => import('../views/homes/Homes.vue'),
      },
      {
        path:'/home/car',
        component:() => import('../views/car/Car.vue'),
      },
      {
        path:'/home/my',
        component:() => import('../views/my/My.vue'),
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
